import request from '@/utils/request'

// 创建测试
export function createSysTest(data) {
  return request({
    url: '/market/sys-test/create',
    method: 'post',
    data: data
  })
}

// 更新测试
export function updateSysTest(data) {
  return request({
    url: '/market/sys-test/update',
    method: 'put',
    data: data
  })
}

// 删除测试
export function deleteSysTest(id) {
  return request({
    url: '/market/sys-test/delete?id=' + id,
    method: 'delete'
  })
}

// 获得测试
export function getSysTest(id) {
  return request({
    url: '/market/sys-test/get?id=' + id,
    method: 'get'
  })
}

// 获得测试分页
export function getSysTestPage(params) {
  return request({
    url: '/market/sys-test/page',
    method: 'get',
    params
  })
}
// 导出测试 Excel
export function exportSysTestExcel(params) {
  return request({
    url: '/market/sys-test/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}